﻿myApp.controller("CustomerProfileCtrl", ['$scope', '$http', '$routeParams', '$restUrls', '$post', '$rootScope', function ($scope, $http, $routeParams, $restUrls, $post, $rootScope) {
    $scope.UserProfile = {};
    $scope.GetCustomerInfo = function (order_id) {
        $http({ method: "GET", url: $restUrls["getCustomerInfo"], params: {  } }).success(function (result) {
            if (result.success == 1) {
                $scope.UserProfile = result.data;
            }
        }).error(function (data, status, headers, config) {
            $.scojs_message('服务器忙,请稍候重试', $.scojs_message.TYPE_ERROR);
        });
    }
    $scope.GetCustomerInfo();

    //查看订单列表
    $scope.GoOrderList = function () {
        window.location.href = "#/orderlist";
    };
    //查看优惠券
    $scope.GoCouponList = function () {
        window.location.href = "#/coupon";
    };

}]);